package com.info.zhiduoduo.common.excelconverter;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.info.zhiduoduo.common.constants.company.CompanyAccountFlowBizType;

/**
 * 业务类型: 1. 项目 2:智众包项目 3:外部项目(嘉银) 4:企业充值 5:企业提现 6:返回智众包保证金 7:转账给创客团账本 8:创客团项目 9:委托接单项目 10:招商银行子帐本充值
 *
 * @see CompanyAccountFlowBizType
 */
public class BiztypeConverter implements Converter<Integer> {

	@Override
	public Class supportJavaTypeKey() {
		return null;
	}

	@Override
	public CellDataTypeEnum supportExcelTypeKey() {
		return null;
	}

	@Override
	public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
	                                 GlobalConfiguration globalConfiguration) throws Exception {
		return null;
	}

	@Override
	public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty,
	                                   GlobalConfiguration globalConfiguration) throws Exception {
		switch (integer) {
			case CompanyAccountFlowBizType.ZDD_PROJECT:
				return new CellData(" 项目");
			case CompanyAccountFlowBizType.CROWDSOURCE_PROJECT :
				return new CellData("智众包项目");
			case CompanyAccountFlowBizType.CROWDSOURCE_ODD_PROJECT :
				return new CellData("智零工项目");
			case CompanyAccountFlowBizType.FOREIGN_PROJECT:
				return new CellData("外部项目");
			case CompanyAccountFlowBizType.RECHARGE :
				return new CellData("企业充值");
			case CompanyAccountFlowBizType.WITHDRAW:
				return new CellData("企业提现");
			case CompanyAccountFlowBizType.RETURN_DEPOSIT :
				return new CellData("返回智众包保证金");
			case CompanyAccountFlowBizType.MAKER_GROUPON :
				return new CellData("转账给创客团账本");
			case CompanyAccountFlowBizType.GROUPON_PROJECT:
				return new CellData("创客团项目");
			case CompanyAccountFlowBizType.ENTRUST_PROJECT:
				return new CellData("委托接单项目");
			case CompanyAccountFlowBizType.SUB_LEDGER_RECHARGE:
				return new CellData("招商银行子帐本充值");
			default:
				return new CellData("");
		}
	}
}
